\(\int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\) [326]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 148 \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}-\frac {2 a \left (a^2-2 b^2\right ) \sqrt {a+b \sec (c+d x)}}{b^4 d}+\frac {2 \left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{3/2}}{3 b^4 d}-\frac {6 a (a+b \sec (c+d x))^{5/2}}{5 b^4 d}+\frac {2 (a+b \sec (c+d x))^{7/2}}{7 b^4 d} \]

[Out]

2/3*(3*a^2-2*b^2)*(a+b*sec(d*x+c))^(3/2)/b^4/d-6/5*a*(a+b*sec(d*x+c))^(5/2)/b^4/d+2/7*(a+b*sec(d*x+c))^(7/2)/b
^4/d-2*arctanh((a+b*sec(d*x+c))^(1/2)/a^(1/2))/d/a^(1/2)-2*a*(a^2-2*b^2)*(a+b*sec(d*x+c))^(1/2)/b^4/d

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3970, 912, 1167, 213} \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {2 \left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{3/2}}{3 b^4 d}-\frac {2 a \left (a^2-2 b^2\right ) \sqrt {a+b \sec (c+d x)}}{b^4 d}-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}+\frac {2 (a+b \sec (c+d x))^{7/2}}{7 b^4 d}-\frac {6 a (a+b \sec (c+d x))^{5/2}}{5 b^4 d} \]

[In]

Int[Tan[c + d*x]^5/Sqrt[a + b*Sec[c + d*x]],x]

[Out]

(-2*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/(Sqrt[a]*d) - (2*a*(a^2 - 2*b^2)*Sqrt[a + b*Sec[c + d*x]])/(b^4
*d) + (2*(3*a^2 - 2*b^2)*(a + b*Sec[c + d*x])^(3/2))/(3*b^4*d) - (6*a*(a + b*Sec[c + d*x])^(5/2))/(5*b^4*d) +
(2*(a + b*Sec[c + d*x])^(7/2))/(7*b^4*d)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 912

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = De
nominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 + a*e^2)/e^2 - 2*c*
d*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*
g, 0] && NeQ[c*d^2 + a*e^2, 0] && IntegersQ[n, p] && FractionQ[m]

Rule 1167

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 3970

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[-(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[(b^2 - x^2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x \sqrt {a+x}} \, dx,x,b \sec (c+d x)\right )}{b^4 d} \\ & = \frac {2 \text {Subst}\left (\int \frac {\left (-a^2+b^2+2 a x^2-x^4\right )^2}{-a+x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{b^4 d} \\ & = \frac {2 \text {Subst}\left (\int \left (-a^3+2 a b^2+\left (3 a^2-2 b^2\right ) x^2-3 a x^4+x^6+\frac {b^4}{-a+x^2}\right ) \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{b^4 d} \\ & = -\frac {2 a \left (a^2-2 b^2\right ) \sqrt {a+b \sec (c+d x)}}{b^4 d}+\frac {2 \left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{3/2}}{3 b^4 d}-\frac {6 a (a+b \sec (c+d x))^{5/2}}{5 b^4 d}+\frac {2 (a+b \sec (c+d x))^{7/2}}{7 b^4 d}+\frac {2 \text {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{d} \\ & = -\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}-\frac {2 a \left (a^2-2 b^2\right ) \sqrt {a+b \sec (c+d x)}}{b^4 d}+\frac {2 \left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{3/2}}{3 b^4 d}-\frac {6 a (a+b \sec (c+d x))^{5/2}}{5 b^4 d}+\frac {2 (a+b \sec (c+d x))^{7/2}}{7 b^4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.87 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.89 \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {-\frac {2 b^4 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a}}-2 a \left (a^2-2 b^2\right ) \sqrt {a+b \sec (c+d x)}+\frac {2}{3} \left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{3/2}-\frac {6}{5} a (a+b \sec (c+d x))^{5/2}+\frac {2}{7} (a+b \sec (c+d x))^{7/2}}{b^4 d} \]

[In]

Integrate[Tan[c + d*x]^5/Sqrt[a + b*Sec[c + d*x]],x]

[Out]

((-2*b^4*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/Sqrt[a] - 2*a*(a^2 - 2*b^2)*Sqrt[a + b*Sec[c + d*x]] + (2*
(3*a^2 - 2*b^2)*(a + b*Sec[c + d*x])^(3/2))/3 - (6*a*(a + b*Sec[c + d*x])^(5/2))/5 + (2*(a + b*Sec[c + d*x])^(
7/2))/7)/(b^4*d)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(645\) vs. \(2(128)=256\).

Time = 16.65 (sec) , antiderivative size = 646, normalized size of antiderivative = 4.36

method result size
default \(-\frac {\sqrt {a +b \sec \left (d x +c \right )}\, \left (105 \cos \left (d x +c \right ) \ln \left (4 \cos \left (d x +c \right ) \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sqrt {a}+4 a \cos \left (d x +c \right )+4 \sqrt {a}\, \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+2 b \right ) \sqrt {a}\, b^{4}+96 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{4} \cos \left (d x +c \right )-280 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{2} b^{2} \cos \left (d x +c \right )+96 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{4}-48 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{3} b -280 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{2} b^{2}+140 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a \,b^{3}-48 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{3} b \sec \left (d x +c \right )+36 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{2} b^{2} \sec \left (d x +c \right )+140 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a \,b^{3} \sec \left (d x +c \right )+36 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a^{2} b^{2} \sec \left (d x +c \right )^{2}-30 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a \,b^{3} \sec \left (d x +c \right )^{2}-30 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, a \,b^{3} \sec \left (d x +c \right )^{3}\right )}{105 d a \,b^{4} \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}}\) \(646\)

[In]

int(tan(d*x+c)^5/(a+b*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/105/d/a/b^4*(a+b*sec(d*x+c))^(1/2)/(cos(d*x+c)+1)/((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*(105
*cos(d*x+c)*ln(4*cos(d*x+c)*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^(1/2)+4*a*cos(d*x+c)+4*a^(1
/2)*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)+2*b)*a^(1/2)*b^4+96*((b+a*cos(d*x+c))*cos(d*x+c)/(cos
(d*x+c)+1)^2)^(1/2)*a^4*cos(d*x+c)-280*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^2*b^2*cos(d*x+c)
+96*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^4-48*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)
^(1/2)*a^3*b-280*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^2*b^2+140*((b+a*cos(d*x+c))*cos(d*x+c)
/(cos(d*x+c)+1)^2)^(1/2)*a*b^3-48*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^3*b*sec(d*x+c)+36*((b
+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^2*b^2*sec(d*x+c)+140*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x
+c)+1)^2)^(1/2)*a*b^3*sec(d*x+c)+36*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a^2*b^2*sec(d*x+c)^2-
30*((b+a*cos(d*x+c))*cos(d*x+c)/(cos(d*x+c)+1)^2)^(1/2)*a*b^3*sec(d*x+c)^2-30*((b+a*cos(d*x+c))*cos(d*x+c)/(co
s(d*x+c)+1)^2)^(1/2)*a*b^3*sec(d*x+c)^3)

Fricas [A] (verification not implemented)

none

Time = 0.43 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.57 \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\left [\frac {105 \, \sqrt {a} b^{4} \cos \left (d x + c\right )^{3} \log \left (-8 \, a^{2} \cos \left (d x + c\right )^{2} - 8 \, a b \cos \left (d x + c\right ) - b^{2} + 4 \, {\left (2 \, a \cos \left (d x + c\right )^{2} + b \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}\right ) - 4 \, {\left (18 \, a^{2} b^{2} \cos \left (d x + c\right ) - 15 \, a b^{3} + 4 \, {\left (12 \, a^{4} - 35 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{3} - 2 \, {\left (12 \, a^{3} b - 35 \, a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{210 \, a b^{4} d \cos \left (d x + c\right )^{3}}, \frac {105 \, \sqrt {-a} b^{4} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + b}\right ) \cos \left (d x + c\right )^{3} - 2 \, {\left (18 \, a^{2} b^{2} \cos \left (d x + c\right ) - 15 \, a b^{3} + 4 \, {\left (12 \, a^{4} - 35 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{3} - 2 \, {\left (12 \, a^{3} b - 35 \, a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{105 \, a b^{4} d \cos \left (d x + c\right )^{3}}\right ] \]

[In]

integrate(tan(d*x+c)^5/(a+b*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/210*(105*sqrt(a)*b^4*cos(d*x + c)^3*log(-8*a^2*cos(d*x + c)^2 - 8*a*b*cos(d*x + c) - b^2 + 4*(2*a*cos(d*x +
 c)^2 + b*cos(d*x + c))*sqrt(a)*sqrt((a*cos(d*x + c) + b)/cos(d*x + c))) - 4*(18*a^2*b^2*cos(d*x + c) - 15*a*b
^3 + 4*(12*a^4 - 35*a^2*b^2)*cos(d*x + c)^3 - 2*(12*a^3*b - 35*a*b^3)*cos(d*x + c)^2)*sqrt((a*cos(d*x + c) + b
)/cos(d*x + c)))/(a*b^4*d*cos(d*x + c)^3), 1/105*(105*sqrt(-a)*b^4*arctan(2*sqrt(-a)*sqrt((a*cos(d*x + c) + b)
/cos(d*x + c))*cos(d*x + c)/(2*a*cos(d*x + c) + b))*cos(d*x + c)^3 - 2*(18*a^2*b^2*cos(d*x + c) - 15*a*b^3 + 4
*(12*a^4 - 35*a^2*b^2)*cos(d*x + c)^3 - 2*(12*a^3*b - 35*a*b^3)*cos(d*x + c)^2)*sqrt((a*cos(d*x + c) + b)/cos(
d*x + c)))/(a*b^4*d*cos(d*x + c)^3)]

Sympy [F]

\[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {\tan ^{5}{\left (c + d x \right )}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \]

[In]

integrate(tan(d*x+c)**5/(a+b*sec(d*x+c))**(1/2),x)

[Out]

Integral(tan(c + d*x)**5/sqrt(a + b*sec(c + d*x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.18 \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {\frac {105 \, \log \left (\frac {\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} - \sqrt {a}}{\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} + \sqrt {a}}\right )}{\sqrt {a}} + \frac {30 \, {\left (a + \frac {b}{\cos \left (d x + c\right )}\right )}^{\frac {7}{2}}}{b^{4}} - \frac {126 \, {\left (a + \frac {b}{\cos \left (d x + c\right )}\right )}^{\frac {5}{2}} a}{b^{4}} + \frac {210 \, {\left (a + \frac {b}{\cos \left (d x + c\right )}\right )}^{\frac {3}{2}} a^{2}}{b^{4}} - \frac {210 \, \sqrt {a + \frac {b}{\cos \left (d x + c\right )}} a^{3}}{b^{4}} - \frac {140 \, {\left (a + \frac {b}{\cos \left (d x + c\right )}\right )}^{\frac {3}{2}}}{b^{2}} + \frac {420 \, \sqrt {a + \frac {b}{\cos \left (d x + c\right )}} a}{b^{2}}}{105 \, d} \]

[In]

integrate(tan(d*x+c)^5/(a+b*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/105*(105*log((sqrt(a + b/cos(d*x + c)) - sqrt(a))/(sqrt(a + b/cos(d*x + c)) + sqrt(a)))/sqrt(a) + 30*(a + b/
cos(d*x + c))^(7/2)/b^4 - 126*(a + b/cos(d*x + c))^(5/2)*a/b^4 + 210*(a + b/cos(d*x + c))^(3/2)*a^2/b^4 - 210*
sqrt(a + b/cos(d*x + c))*a^3/b^4 - 140*(a + b/cos(d*x + c))^(3/2)/b^2 + 420*sqrt(a + b/cos(d*x + c))*a/b^2)/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 699 vs. \(2 (128) = 256\).

Time = 1.81 (sec) , antiderivative size = 699, normalized size of antiderivative = 4.72 \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {2 \, {\left (\frac {105 \, \arctan \left (-\frac {\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} + \sqrt {a - b}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {2 \, {\left (105 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{6} - 840 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{5} \sqrt {a - b} + 35 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{4} {\left (27 \, a - 23 \, b\right )} + 280 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{3} {\left (3 \, a + 4 \, b\right )} \sqrt {a - b} - 21 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{2} {\left (65 \, a^{2} - 2 \, a b - 15 \, b^{2}\right )} + 315 \, a^{3} + 707 \, a^{2} b - 7 \, a b^{2} - 55 \, b^{3} - 56 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )} {\left (19 \, a b + 5 \, b^{2}\right )} \sqrt {a - b}\right )}}{{\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} - \sqrt {a - b}\right )}^{7}}\right )}}{105 \, d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \]

[In]

integrate(tan(d*x+c)^5/(a+b*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

2/105*(105*arctan(-1/2*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1
/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b) + sqrt(a - b))/sqrt(-a))/sqrt(-a) - 2*(105*(sqrt(a - b)*tan(1/2*
d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b
))^6 - 840*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*
a*tan(1/2*d*x + 1/2*c)^2 + a + b))^5*sqrt(a - b) + 35*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x
 + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b))^4*(27*a - 23*b) + 280*(sqrt(a -
b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c
)^2 + a + b))^3*(3*a + 4*b)*sqrt(a - b) - 21*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)
^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b))^2*(65*a^2 - 2*a*b - 15*b^2) + 315*a^3 + 7
07*a^2*b - 7*a*b^2 - 55*b^3 - 56*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1
/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b))*(19*a*b + 5*b^2)*sqrt(a - b))/(sqrt(a - b)*tan(1/2*d*
x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b)
- sqrt(a - b))^7)/(d*sgn(cos(d*x + c)))

Mupad [F(-1)]

Timed out. \[ \int \frac {\tan ^5(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {{\mathrm {tan}\left (c+d\,x\right )}^5}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \]

[In]

int(tan(c + d*x)^5/(a + b/cos(c + d*x))^(1/2),x)

[Out]

int(tan(c + d*x)^5/(a + b/cos(c + d*x))^(1/2), x)